import { _decorator, Button, Component, Node } from 'cc';
import { UIBase } from '../utils/UIFramework/UIBase';
import { ProbeEventList } from '../utils/EventSystem/EventList';
const { ccclass, property } = _decorator;

@ccclass('MainMenu')
export class MainMenu extends UIBase {

    public startGameEvent : ProbeEventList = new ProbeEventList();

    public onOpen(): void {
        this.uiMap.GetNode("startButton").on(Button.EventType.CLICK,
            ()=>{
                this.startGameEvent.DoEvent();
            }
            ,this)
    }

    public onClose(): void {
        this.node.targetOff(this.uiMap.GetNode("startButton"));
    }
}


